home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 3
/
Cream of the Crop 3.iso
/
diag
/
bustest.zip
/
BUSTEST.REA
< prev
Wrap
Text File
|
1994-04-13
|
5KB
|
132 lines
SHORT: memory speed tester (OS2.0 required)
Hello world :)
bustest is a small utility to measure data transfer speed
to and from memory. It requires AmigaOS2.0 or higher.
Method:
determine a 16kByte chunk of memory and time read and
write operations with the pretty exact CIA timers. After
that the overhead of the measurement is compensated.
During measurement other tasks are locked out, but _interrupts_
are not. However, interrupt activity shouldn't influence
the measurement unless you send lots of data to the serial
port or sit on a heavy duty network.
What you get ?
The performance of a very large sequence of MOVE instructions.
Either word or long word moves or bursts of 8 longword moves
using the MOVEM instruction are used.
Special caveat:
The 68040 usually uses a _copyback_ cache. This means, that
_writing_ causes the cache to _read_ the data first (and later
_write_ it) thus halving write performance when writing large
blocks.
Small blocks like local variables usually fit into the cache and
are just read once which is the reason for the good performance
of the copyback cache. But.. block writes are the worst case. The
68040 has a special MOVE16 instruction to circumvent that problem,
but it is not used in the AmigaOS (nor in this test program).
How to use:
bustest accepts 2 parameters. One number and one address starting
with a '-'. The number determines the number of loops, the higher
the number the more accurate is the test. For most machines the
default of 100 is sufficient. The address parameter gives an
extra 16KB memory block to test. Normally bustest will allocate
chunks of chip memory and fast memory and also checks read performance
of the kickstart ROM addresses. The extra address can specify
memory that does not appear in the system memory lists (like a
_graphics frame buffer_) or memory that isn't reached by the next
AllocMem call (say 16bit memory on a system with enough 32bit memory).
bustest tries to check the address and will refuse to test it when
it believes that the memory is used by anything else. BUT: it is
possible to specify addresses that are not mapped to anything, resulting
in thousands of bus errors. So be very careful when using that option.
A good means to find out what memory addresses is used by say a graphics
board is the command 'showconfig'. Some boards map into two address
ranges that seperate the framebuffer memory and the control registers,
the larger block is then the framebuffer. If in doubt ask your board's
manual or the manufacturer. Some cards also act different after their
driver software has been loaded.
Examples:
1> bustest
BusSpeedTest 0.07 (mlelstv) Buffer: 16384 Bytes
==================================================
loop overhead: 8.8ns
register move: 82.3ns
memtype op cycle bandwidth
fast readw 244.8ns 8.2MByte/s
fast readl 331.8ns 12.1MByte/s
fast readm 304.7ns 13.1MByte/s
fast writew 246.4ns 8.1MByte/s
fast writel 246.6ns 16.2MByte/s
fast writem 225.0ns 17.8MByte/s
chip readw 879.0ns 2.3MByte/s
chip readl 881.5ns 4.5MByte/s
chip readm 660.4ns 6.1MByte/s
chip writew 570.7ns 3.5MByte/s
chip writel 570.4ns 7.0MByte/s
chip writem 570.9ns 7.0MByte/s
rom readw 245.8ns 8.1MByte/s
rom readl 332.5ns 12.0MByte/s
rom readm 305.1ns 13.1MByte/s
This is the output of bustest on my A3000/25.
1> showconfig
PROCESSOR: CPU 68030/68882fpu/68030mmu
CUSTOM CHIPS: ECS PAL Agnus (id=$0020), ECS Denise (id=$00FC)
VERS: Kickstart version 40.68, Exec version 40.10, Disk version 40.42
RAM: Node type $A, Attributes $505 (FAST), at $7000000-$7F7FFFF (15.5 meg)
Node type $A, Attributes $703 (CHIP), at $400-$1FFFFF (~2.0 meg)
BOARDS:
Board (unidentified): Prod=2145/32($861/$20) (@$200000 2meg)
Board (unidentified): Prod=43537/17($AA11/$11) (@$E90000 64K)
Board (unidentified): Prod=18260/4($4754/$4) (@$EA0000 64K)
CBM Arcnet card: Prod=514/9($202/$9) (@$EB0000 64K)
Board (unidentified): Prod=2011/0($7DB/$0) (@$EF0000 64K)
The first board is an old Rainbow-2 framebuffer.
1> bustest -$200000
BusSpeedTest 0.07 (mlelstv) Buffer: 16384 Bytes
==================================================
loop overhead: 9.1ns
register move: 81.6ns
memtype op cycle bandwidth
fast readw 244.6ns 8.2MByte/s
fast readl 331.0ns 12.1MByte/s
fast readm 304.9ns 13.1MByte/s
fast writew 246.6ns 8.1MByte/s
fast writel 245.8ns 16.3MByte/s
fast writem 224.6ns 17.8MByte/s
chip readw 882.3ns 2.3MByte/s
chip readl 885.1ns 4.5MByte/s
chip readm 661.1ns 6.1MByte/s
chip writew 570.3ns 3.5MByte/s
chip writel 570.6ns 7.0MByte/s
chip writem 570.8ns 7.0MByte/s
rom readw 245.8ns 8.1MByte/s
rom readl 332.0ns 12.0MByte/s
rom readm 305.5ns 13.1MByte/s
$00200000 readw 845.1ns 2.4MByte/s
$00200000 readl 1561.6ns 2.6MByte/s
$00200000 readm 1540.7ns 2.6MByte/s
$00200000 writew 736.5ns 2.7MByte/s
$00200000 writel 1478.8ns 2.7MByte/s
$00200000 writem 1480.3ns 2.7MByte/s
You see the additional output for the graphics board.
Michael van Elst